home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / itrns211.zip / SRC / IMAP.H < prev    next >
C/C++ Source or Header  |  1991-09-26  |  5KB  |  153 lines

  1. #ifndef ITRANS_MAP_H
  2. #define ITRANS_MAP_H
  3.  
  4. /*
  5.  *========================================================================== 
  6.  * Copyright 1991 Avinash Chopde, All Rights Reserved.
  7.  *
  8.  * Permission to use, copy, modify and distribute this software and its
  9.  * documentation for any purpose is hereby granted without fee, provided that
  10.  * the above copyright notice appear in all copies and that both that
  11.  * copyright notice and this permission notice appear in supporting
  12.  * documentation, and that the name of Avinash Chopde not be used in
  13.  * advertising or publicity pertaining to distribution of the software
  14.  * without specific, written prior permission.
  15.  * Avinash Chopde makes no representations about the suitability of this
  16.  * software for any purpose.
  17.  * It is provided "as is" without express or implied warranty.
  18.  *
  19.  * AVINASH CHOPDE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  20.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  21.  * IN NO EVENT SHALL AVINASH CHOPDE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  23.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  24.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  25.  * OF THIS SOFTWARE.
  26.  *
  27.  * Author:  Avinash Chopde, 1991
  28.  *        C2 Colonial Drive #4, Andover, MA 01810, USA.
  29.  *
  30.  */
  31.  
  32. /* static char S_RCSID[] = "$Header: e:/itrans/src/rcs/imap.h 1.3 91/09/26 22:59:01 avinash Exp $"; */
  33.  
  34. #ifndef MSDOS
  35. #include "y.tab.h"
  36. #else
  37. #include "y_tab.h"
  38. #endif
  39.  
  40. #define    CNAMELEN    16
  41.     /* max length of the code name of any indian char */
  42.  
  43. typedef struct {
  44.     int        token; /* char token - assigned by y.tab.h */
  45.     char    codename[CNAMELEN+1]; /* name assigned to it in ifm file */
  46. } ifm_enc_t;
  47.  
  48. /* Some arbit representation of input token names, this is pretty
  49.  * much free-form - no duplicate names allowed.
  50.  * Used to parse the Devn Metrics file - see font.c
  51.  * XXX
  52.  * Will presumably be used later, to make error messages a bit
  53.  * descriptive as to what actually expected...
  54.  
  55.  * Note:  names should be letters only (case is not ignored)
  56.  *        do not use "-" in the names.
  57.  * Any changes here implies that the file font.c needs to be edited:
  58.  * the struct S_ifm_map has to be filled in accordingly.
  59.  */
  60.  
  61. #define A_CNAME        "a"
  62. #define AA_CNAME    "aa"
  63. #define I_CNAME        "i"
  64. #define II_CNAME    "ii"
  65. #define U_CNAME        "u"
  66. #define UU_CNAME    "uu"
  67. #define RI_CNAME    "ri"
  68. #define RII_CNAME    "rii"
  69. #define LI_CNAME    "li"
  70. #define LII_CNAME    "lii"
  71. #define AY_CNAME    "ay"
  72. #define AAY_CNAME    "aay"
  73. #define AI_CNAME    "ai"
  74. #define O_CNAME        "o"
  75. #define OO_CNAME    "oo"
  76. #define AU_CNAME    "au"
  77. #define AM_CNAME    "am"
  78. #define AHA_CNAME    "aha"
  79. #define KA_CNAME    "ka"
  80. #define KADOT_CNAME    "kadot"
  81. #define KHA_CNAME    "kha"
  82. #define KHADOT_CNAME    "khadot"
  83. #define GA_CNAME    "ga"
  84. #define GADOT_CNAME    "gadot"
  85. #define GHA_CNAME    "gha"
  86. #define NGA_CNAME    "nga"
  87. #define CHA_CNAME    "cha"
  88. #define CHHA_CNAME    "chha"
  89. #define JA_CNAME    "ja"
  90. #define JADOT_CNAME    "jadot"
  91. #define JHA_CNAME    "jha"
  92. #define JNH_CNAME    "jnh"
  93. #define TTA_CNAME    "tta"
  94. #define TTHA_CNAME    "ttha"
  95. #define DDA_CNAME    "dda"
  96. #define DDADOT_CNAME    "ddadot"
  97. #define DDHA_CNAME    "ddha"
  98. #define DDHADOT_CNAME    "ddhadot"
  99. #define NNA_CNAME    "nna"
  100. #define TA_CNAME    "ta"
  101. #define THA_CNAME    "tha"
  102. #define DA_CNAME    "da"
  103. #define DHA_CNAME    "dha"
  104. #define NA_CNAME    "na"
  105. #define PA_CNAME    "pa"
  106. #define PHA_CNAME    "pha"
  107. #define PHADOT_CNAME    "phadot"
  108. #define BA_CNAME    "ba"
  109. #define BHA_CNAME    "bha"
  110. #define MA_CNAME    "ma"
  111. #define YA_CNAME    "ya"
  112. #define RA_CNAME    "ra"
  113. #define LA_CNAME    "la"
  114. #define VA_CNAME    "va"
  115. #define SHA_CNAME    "sha"
  116. #define SHHA_CNAME    "shha"
  117. #define SA_CNAME    "sa"
  118. #define HA_CNAME    "ha"
  119. #define LDA_CNAME    "lda"
  120. #define KSHA_CNAME    "ksha"
  121. #define GYA_CNAME    "gya"
  122. #define NYA_CNAME    "nya"
  123. #define NNX_CNAME    "nnx"
  124. #define RRA_CNAME    "rra"
  125.  
  126. #define RA_HALF_CNAME    "rahalf"
  127. #define ANUSVARA_CNAME    "anusvara"
  128. #define CHANDRA_CNAME    "chandra"
  129. #define CHANDRA_BN_CNAME    "chandrabindu"
  130. #define VIRAAM_CNAME    "viraam"
  131. #define AVAGRAHA_CNAME    "avagraha"
  132. #define SRI_CNAME    "sri"
  133. #define AUM_CNAME    "aum"
  134.  
  135. /* num indian lang characters */
  136. /* see font.c also */
  137. #define FIRSTCHAR    _I_(A_TOK)
  138. #define LASTCHAR    _I_(AUM_TOK)
  139. #define    NUMCHARS    (LASTCHAR-FIRSTCHAR+1)
  140. #define FIRSTVOW    _I_(A_TOK)
  141. #define LASTVOW        _I_(AHA_TOK)
  142. #define FIRSTCONS    _I_(KA_TOK)
  143. #define LASTCONS    _I_(PHADOT_TOK)
  144. #define NUMEXTRA    10
  145. #define    NUMKHADI    (NUMCHARS+NUMEXTRA)
  146.     /* allow for extra chars that the user may define */
  147. #define    OFFSET_TOK    (DUMMY_TOK+1)
  148.  
  149. /* num postscript chars - 8 bits = 0 to 255 */
  150. #define    NUMPSCHARS    256
  151.  
  152. #endif /* ITRANS_MAP_H */
  153.